// ----------------------------------------------------------------------------
// gfx_agl.cpp
// ----------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>

extern "C" void GfxOpenWindowC( int x0, int y0, int width, int height);
extern "C" void GfxGetWindowSizeC(int *width, int* height);
extern "C" void GfxPollDeviceC(void);
extern "C" void GfxSleepC(int ms);
extern "C" int  GfxPassedTimeC(void);
extern "C" void GfxMouseC(int *lb, int *mb, int *rb, int *mx, int *my);
extern "C" int  GfxMouseEventC(int *lb,int *mb,int *rb,int *mx,int *my);
extern "C" void GfxSwapBufferC(void);
extern "C" int  GfxInKeyC(void);
extern "C" int  GfxInKeyCharC(void);
extern "C" int  GfxKeyStateC(int keyState);
extern "C" void GfxChangeToProgramDirC(void);
extern "C" int  GfxCheckExposureC(void);

void GfxOpenWindow( int x0, int y0, int width, int height )
{
    GfxOpenWindowC(x0, y0, width, height);
}

void GfxGetWindowSize( int &width, int &height )
{
    GfxGetWindowSizeC(&width, &height);
}

void GfxPollDevice( void )
{
    GfxPollDeviceC();
}

void GfxSleep( int ms )
{
    GfxSleepC(ms);
}

int GfxPassedTime( void )
{
    return GfxPassedTimeC();
}

void GfxMouse( int &lb, int &mb, int &rb, int &mx, int &my )
{
    return GfxMouseC(&lb, &mb, &rb, &mx, &my);
}

int GfxMouseEvent( int &lb, int &mb, int &rb, int &mx, int &my )
{
    return GfxMouseEventC(&lb, &mb, &rb, &mx, &my);
}

void GfxSwapBuffer( void )
{
    GfxSwapBufferC();
}

int GfxInKey( void )
{
    return GfxInKeyC();
}

int GfxInKeyChar( void )
{
    return GfxInKeyCharC();
}

int GfxKeyState( int keyState )
{
    return GfxKeyStateC(keyState);
}

void GfxChangeToProgramDir( void )
{
    GfxChangeToProgramDirC();
}

int GfxCheckExposure( void )
{
    return GfxCheckExposureC();
}


